4bed6f319ed4b529f593e41e8ccbf6519fd24bcb,src/main/java/org/bytedeco/javacpp/tools/Parser.java,Parser,typedef,#Context#DeclarationList#,2070

Before Change


            }
        } else {
            // point back to original type
            Info info = infoMap.getFirst(typeName);
            if (info == null || !info.skip) {
                info = info != null ? new Info(info).cppNames(defName) : new Info(defName);
                if (info.cppTypes == null && info.annotations != null) {

After Change


            }
        } else {
            // point back to original type
            info = infoMap.getFirst(typeName);
            if (info == null || !info.skip) {
                info = info != null ? new Info(info).cppNames(defName) : new Info(defName);
                if (info.cppTypes == null && info.annotations != null) {
                    // set original C++ type for typedef of types we want to use with adapters
                    String s = typeName;
                    if (dcl.type.constValue && !s.startsWith("const ")) {
                        s = "const " + s;
                    }
                    if (dcl.type.constPointer && !s.endsWith(" const")) {
                        s = s + " const";
                    }
                    if (dcl.type.indirections > 0) {
                        for (int i = 0; i < dcl.type.indirections; i++) {
                            s += "*";
                        }
                    }
                    if (dcl.type.reference) {
                        s += "&";
                    }
                    info.cppNames(defName, s).cppTypes(s);
                }
                if (info.valueTypes == null && dcl.indirections > 0) {
                    info.valueTypes(info.pointerTypes != null ? info.pointerTypes : new String[] {typeName});
                    info.pointerTypes("PointerPointer");
                } else if (info.pointerTypes == null) {
                    info.pointerTypes(typeName);
                }
                if (info.annotations == null) {
                    info.cast(!dcl.cppName.equals(info.pointerTypes[0]));
                }
                infoMap.put(info);
            }
        }

        if (info != null && info.javaText != null) {
            decl.text = info.javaText;
        }
        String comment = commentAfter();